﻿using SqlSugar;

/// <summary>
/// 
/// </summary>
namespace RuoVea.Gantt.Entity
{
    /// <summary>
    /// 任务类别
    /// </summary>
    [SugarTable("gantt_item")]
    public class GanttItem
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 颜色
        /// </summary>
        public string Color { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Descript { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int? Sort { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }
        /// <summary>
        /// 创建者Id
        /// </summary>
        public long? CreatedUserId { get; set; }
        /// <summary>
        /// 修改者Id
        /// </summary>
        public long? UpdatedUserId { get; set; }
        /// <summary>
        /// 软删除标记
        /// </summary>
        public int? IsDeleted { get; set; }
    }

    /// <summary>
    /// 优先级
    /// </summary>
    [SugarTable("gantt_priority")]
    public class GanttPriority
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }

        /// <summary>
        /// 名称 最高 较高 普通 较低 最低
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 颜色
        /// </summary>
        public string Color { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int? Sort { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }
        /// <summary>
        /// 创建者Id
        /// </summary>
        public long? CreatedUserId { get; set; }
        /// <summary>
        /// 修改者Id
        /// </summary>
        public long? UpdatedUserId { get; set; }
        /// <summary>
        /// 软删除标记
        /// </summary>
        public int? IsDeleted { get; set; }
    }

    /// <summary>
    /// 状态
    /// </summary>
    [SugarTable("gantt_start")]
    public class GanttStart
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }

        /// <summary>
        /// 创建 执行 完成 关闭
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 颜色
        /// </summary>
        public string Color { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int? Sort { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }
        /// <summary>
        /// 创建者Id
        /// </summary>
        public long? CreatedUserId { get; set; }
        /// <summary>
        /// 修改者Id
        /// </summary>
        public long? UpdatedUserId { get; set; }
        /// <summary>
        /// 软删除标记
        /// </summary>
        public int? IsDeleted { get; set; }
    }

    /// <summary>
    /// 任务列表
    /// </summary>
    [SugarTable("gantt_tasks")]
    public class GanttTtasks
    {
        /// <summary>
        /// 编码
        /// </summary>
        [SugarColumn(  IsPrimaryKey = true, ColumnName = "Id")]
        public long? id { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string label { get; set; }
        /// <summary>
        /// 用户
        /// </summary>
        public string? user { get; set; }
        /// <summary>
        /// 父Id
        /// </summary>
        public int? parentId { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime start { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime end { get; set; }
        /// <summary>
        /// 耗时
        /// </summary>
        public long? duration { get; set; }
        /// <summary>
        /// 百分比*100
        /// </summary>
        public int? percent { get; set; }
        /// <summary>
        /// 类别Id
        /// </summary>
        public int? ItemId { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int? StartId { get; set; }
        /// <summary>
        /// 优先级
        /// </summary>
        public int? PriorityId { get; set; }

        public int? progress { get; set; }
        /// <summary>
        /// 是否展开 有子目录时才需要设置
        /// </summary>
        public bool? collapsed { get; set; }
        /// <summary>
        /// 紧前任务
        /// </summary>
        public int? dependentOn { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }
        /// <summary>
        /// 创建者Id
        /// </summary>
        public long? CreatedUserId { get; set; }
        /// <summary>
        /// 修改者Id
        /// </summary>
        public long? UpdatedUserId { get; set; }
        /// <summary>
        /// 软删除标记
        /// </summary>
        public int? IsDeleted { get; set; }
    }
}
